<template>
	<view class="container">
		<view class="" v-html="coinrule">
		</view>
	</view>
</template>

<script>
	import {
		webconfig
	} from '@/common/http.api.js';
	export default {
		data() {
			return {
				type: "",
				coinrule: ''
			}
		},
		onLoad(o) {
			console.log(o);
			this.type = o.type
			this.getwebconfig()
		},
		methods: {
			getwebconfig() {
				webconfig({}).then(res => {
					if (res.code == 200) {
						if (this.type == "coinrule") {
							this.coinrule = res.data.coinrule
							uni.setNavigationBarTitle({
								title: '商人币使用规则'
							})
						}else{
							uni.setNavigationBarTitle({
								title: '发布规则'
							})
							this.coinrule = res.data[this.type]
						}
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		padding: 20rpx;
		font-size: 28rpx;
		line-height: 40rpx;
	}
</style>